\doxysection{Mag\+Graphics\+View.\+h}
\hypertarget{_mag_graphics_view_8h_source}{}\label{_mag_graphics_view_8h_source}\index{magtwin/include/MagGraphicsView.h@{magtwin/include/MagGraphicsView.h}}
\mbox{\hyperlink{_mag_graphics_view_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ }
\DoxyCodeLine{00008\ \textcolor{preprocessor}{\#pragma\ once}}
\DoxyCodeLine{00009\ }
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <QGraphicsView>}}
\DoxyCodeLine{00011\ \textcolor{preprocessor}{\#include\ <QGraphicsScene>}}
\DoxyCodeLine{00012\ \textcolor{preprocessor}{\#include\ <QWheelEvent>}}
\DoxyCodeLine{00013\ \textcolor{preprocessor}{\#include\ <QLabel>}}
\DoxyCodeLine{00014\ \textcolor{preprocessor}{\#include\ <QMouseEvent>}}
\DoxyCodeLine{00015\ \textcolor{preprocessor}{\#include\ <QTransform>}}
\DoxyCodeLine{00016\ \textcolor{preprocessor}{\#include\ <QPushButton>}}
\DoxyCodeLine{00017\ \textcolor{preprocessor}{\#include\ <QGraphicsRectItem>}}
\DoxyCodeLine{00018\ \textcolor{preprocessor}{\#include\ <QPolygonF>}}
\DoxyCodeLine{00019\ \textcolor{preprocessor}{\#include\ <QList>}}
\DoxyCodeLine{00020\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{_g_mesh_8h}{GMesh.h}}"{}}}
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00027\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_mag_graphics_view}{MagGraphicsView}}\ :\ \textcolor{keyword}{public}\ QGraphicsView}
\DoxyCodeLine{00028\ \{}
\DoxyCodeLine{00029\ \ \ \ \ Q\_OBJECT}
\DoxyCodeLine{00030\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00031\ \ \ \ \ QGraphicsScene\ *scene;\ \textcolor{comment}{//\ 图形场景}}
\DoxyCodeLine{00032\ \ \ \ \ QLabel\ *coordinateLabel;\ \textcolor{comment}{//\ 鼠标坐标标签}}
\DoxyCodeLine{00033\ \ \ \ \ QPoint\ lastPos;\ \textcolor{comment}{//\ 上一次鼠标位置记录}}
\DoxyCodeLine{00034\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00039\ \ \ \ \ \mbox{\hyperlink{class_mag_graphics_view_a9175a33e8e2739d3e5e632c6c2715da7}{MagGraphicsView}}(QWidget\ *parent\ =\ \textcolor{keyword}{nullptr});}
\DoxyCodeLine{00043\ \ \ \ \ \mbox{\hyperlink{class_mag_graphics_view_a026b98b72cf9edb611cc998d529587d8}{\string~MagGraphicsView}}();}
\DoxyCodeLine{00048\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a3d0f9f9a0d29d1fe8ec9645b38f9721d}{addPoint}}(QList<QPointF>\ Points);}
\DoxyCodeLine{00053\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_aff7c12efbb55fcda4f29e932ff891ce0}{addLine}}(QList<QPointF>\ Points);}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_aa565f78d8f8e2897335665b2536032f6}{addRriangle}}(QList<QPointF>\ Points);}
\DoxyCodeLine{00062\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a79d8615756b7c80bd17ce15f68babe67}{clearCanvas}}();}
\DoxyCodeLine{00063\ \textcolor{keyword}{public}\ slots:}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a9efcab8c2747320e9c469cc77acdf11a}{showMesh}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_g_mesh}{GMesh}}\&\ mesh);}
\DoxyCodeLine{00073\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a06c0fbf0bb356cb2fdaa7e1af0e6b025}{resizeGraphics}}(\mbox{\hyperlink{class_mag_graphics_view}{MagGraphicsView}}*\ ShowGraphics);}
\DoxyCodeLine{00074\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a5522102a95e0a3b8d08bc9dccce5063e}{wheelEvent}}(QWheelEvent\ *event)\ \textcolor{keyword}{override};\ }
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a880c0681111672605333b1c15b567b1c}{mousePressEvent}}(QMouseEvent\ *event)\ \textcolor{keyword}{override};\ }
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a795ba880577b0ed3d11266f75734c73c}{mouseMoveEvent}}(QMouseEvent\ *event)\ \textcolor{keyword}{override};\ }
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_mag_graphics_view_a583b7e56e1f37c7f372a0b47a0b21ef0}{mouseReleaseEvent}}(QMouseEvent\ *event)\ \textcolor{keyword}{override};\ }
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_mag_graphics_view_aa8eb070a34aba2fc4de03130557f46be}{eventFilter}}(QObject\ *obj,\ QEvent\ *event)\ \textcolor{keyword}{override};\ }
\DoxyCodeLine{00100\ \};}

\end{DoxyCode}
